package com.sloera.nacos.controller;

import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
@Slf4j
@Data
public class ProviderController {

    @Value("${server.port}")
    private String port;
    @GetMapping("service")
    public String service(String aaa, HttpServletRequest request) {
        log.info("服务提供者提供了服务");
        log.error("uid:"+request.getHeader("uid"));
        return "hello,this is provider.端口为："+getPort()+" aaa为:"+aaa;
    }
}
